Alfresco Index of Web Scripts URI '/api/wcm/webprojects/{webprojectref}/sandboxes/{sandboxref}/assets/{path}'
Alfresco Community v3.2.0 (2039)
4 Web Scripts

Back to Web Scripts Home

Up to uri /api/wcm/webprojects/{webprojectref}/sandboxes/{sandboxref}/assets

Delete the specified asset.
DELETE /alfresco/service/api/wcm/webprojects/{webprojectref}/sandboxes/{sandboxref}/assets/{path}
DELETE /alfresco/service/api/wcm/webprojects/{webprojectref}/sandboxes/{sandboxref}/assets/{path}?webApp={webApp?}
Description:Delete the specified asset.
If the optional webApp argument is specified then the path is relative to the webapp e.g. /index.htm
If webApp is not specified then the path is will be absolute e.g. /www/avm_webapps/ROOT/index.htm
Returns STATUS_OK(200) for success.
Authentication:user
Transaction:required
Format Style:argument
Lifecycle:draft_public_api
Default Format:json
Id:org/alfresco/repository/wcm/sandbox/Asset/asset.delete
Description:classpath:alfresco/templates/webscripts/org/alfresco/repository/wcm/sandbox/Asset/asset.delete.desc.xml

Get the details of the specified asset within the specified web project and sandbox.
GET /alfresco/service/api/wcm/webprojects/{webprojectref}/sandboxes/{sandboxref}/assets/{path}
GET /alfresco/service/api/wcm/webprojects/{webprojectref}/sandboxes/{sandboxref}/assets/{path}?webApp={webApp?}
Description:Get the details of the specified asset.
If the asset is a folder, includes the children of that folder.
If the asset is a file, gives the size of the file.
If the optional webApp argument is specified then returns the asset relative to that web app e.g. /index.htm
If webApp is not specified then the path is will be absolute e.g. /www/avm_webapps/ROOT/index.htm
Return STATUS_OK, 200
Output - The asset in JSON format data: path, the full path of the asset. name, the name of the asset creator createdDate, iso8601, modifier modifiedDate, iso8601, isLocked, boolean isFile, boolean isFolder, boolean isDeleted, boolean children, JSON array, only present for folder fileSize, numeric, only present for files
Authentication:user
Transaction:required
Format Style:argument
Lifecycle:draft_public_api
Default Format:json
Id:org/alfresco/repository/wcm/sandbox/Asset/asset.get
Description:classpath:alfresco/templates/webscripts/org/alfresco/repository/wcm/sandbox/Asset/asset.get.desc.xml

Create a new WCM asset.
POST /alfresco/service/api/wcm/webprojects/{webprojectref}/sandboxes/{sandboxref}/assets/{path}
POST /alfresco/service/api/wcm/webprojects/{webprojectref}/sandboxes/{sandboxref}/assets/{path}?webApp={webApp?}
Description:Create a new WCM Asset in the specified path and sandbox.
If the optional webApp argument is specified then the path is relative to the webapp.
If webApp is not specified then the path is will be absolute e.g. /www/avm_webapps/ROOT
JSON Input values
name
mandatory name of this asset
type
mandatory "file" or "folder"
content/dt>
optional, string content of the new file, this is a convenience method, normally content is added via the file upload which gives greater control over the content.
JSON Return value:
 data:The newly created asset in JSON format. 
Authentication:user
Transaction:required
Format Style:argument
Lifecycle:draft_public_api
Default Format:json
Id:org/alfresco/repository/wcm/sandbox/Asset/asset.post
Description:classpath:alfresco/templates/webscripts/org/alfresco/repository/wcm/sandbox/Asset/asset.post.desc.xml

Update a WCM asset.
PUT /alfresco/service/api/wcm/webprojects/{webprojectref}/sandboxes/{sandboxref}/assets/{path}
PUT /alfresco/service/api/wcm/webprojects/{webprojectref}/sandboxes/{sandboxref}/assets/{path}?webApp={webApp?}
Description:Update a WCM Asset, you can rename or move an asset.
JSON Input properties
name
optional rename this file or folder to this new name
path
optional move this file or folder to this path. The destination folder must already exist.

JSON Return data:
Authentication:user
Transaction:required
Format Style:argument
Lifecycle:draft_public_api
Default Format:json
Id:org/alfresco/repository/wcm/sandbox/Asset/asset.put
Description:classpath:alfresco/templates/webscripts/org/alfresco/repository/wcm/sandbox/Asset/asset.put.desc.xml